﻿<Window
    x:Class="PersianEditor.Windows.LoadingWin"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    Title="WELLCOME"
    Width="Auto" Height="Auto"
    Visibility="Visible" 
    WindowStyle="None" 
    AllowsTransparency="True"
    ResizeMode="NoResize" 
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    
    <Window.Background>
        <RadialGradientBrush>            
        <GradientStop Color="White" Offset="0.03"></GradientStop>
        <GradientStop Color="LightBlue" Offset="0.07"></GradientStop>
        <GradientStop Color="#082A4E" Offset="0.57"></GradientStop>
        <GradientStop Color="Transparent" Offset="1"></GradientStop>
        </RadialGradientBrush>
    </Window.Background>


    <Window.Resources>

        <Storyboard x:Key="SampleText"/>

        <Storyboard x:Key="OpeningAnim"
                    BeginTime="00:00:00.7">

            <DoubleAnimationUsingKeyFrames
                BeginTime="00:00:00"
                Storyboard.TargetName="shadow"
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">

                <SplineDoubleKeyFrame 
                    KeyTime="00:00:00"
                    Value="2"/>

                <SplineDoubleKeyFrame 
                    KeyTime="00:00:00.4000000" 
                    Value="1"/>

            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="xamFeature" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="shadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="xamFeature" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="2"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="shadow" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="xamFeature" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="shadow" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="xamBroswerClose" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="00:00:00.0010000">
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="xamBroswerClose" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Duration="00:00:00.0010000">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="xamBroswerClose" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Duration="00:00:00.0010000">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
    </Window.Resources>
    
    <Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource OpeningAnim}"/>
        </EventTrigger>
    </Window.Triggers>
    
    <Grid x:Name="LayoutRoot">
        
        <Viewbox MaxWidth="650">
            
            <Grid>
                
                <Image
                    RenderTransformOrigin="0.5,0.5" 
                    x:Name="shadow" 
                    Stretch="None"  
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center" 
                    Margin="0,0,0,162" 
                    Opacity="0" 
                    Source="/PersianEditor;component/Resources/Images/PersianLogo.png">
                    
                    
                    <Image.RenderTransform>
                        <TransformGroup>
                            
                            <ScaleTransform 
                                ScaleX="1" 
                                ScaleY="1"/>
                            
                            <SkewTransform
                                AngleX="0" 
                                AngleY="0"/>
                            
                            <RotateTransform 
                                Angle="0"/>
                            
                            <TranslateTransform 
                                X="0" 
                                Y="0"/>
                            
                        </TransformGroup>
                        
                    </Image.RenderTransform>
                    
                </Image>
                
                <Image 
                    RenderTransformOrigin="0.5,0.5" 
                    x:Name="xamFeature"  
                    HorizontalAlignment="Center" 
                    VerticalAlignment="Center" 
                    Stretch="None" 
                    Opacity="0" 
                    Source="/PersianEditor;component/Resources/Images/PersianLogo.png">

                    <Image.RenderTransform>
                        
                        <TransformGroup>
                            
                            <ScaleTransform 
                                ScaleX="1" 
                                ScaleY="1"/>
                            
                            <SkewTransform 
                                AngleX="0" 
                                AngleY="0"/>
                            
                            <RotateTransform 
                                Angle="0"/>
                            
                            <TranslateTransform
                                X="0" 
                                Y="0"/>
                            
                        </TransformGroup>
                        
                    </Image.RenderTransform>
                    
                </Image>
                
                <Image 
                    RenderTransformOrigin="0.5,0.5" 
                    HorizontalAlignment="Center" 
                    x:Name="xamBroswerClose"
                    VerticalAlignment="Center" 
                    Width="Auto" Height="Auto"  
                    Opacity="0" 
                    Source="/PersianEditor;component/Resources/Images/PersianLogo.png">

                    <Image.RenderTransform>
                        <TransformGroup>
                            
                            <ScaleTransform 
                                ScaleX="1" 
                                ScaleY="1"/>
                            
                            <SkewTransform 
                                AngleX="0" 
                                AngleY="0"/>
                            
                            <RotateTransform
                                Angle="0"/>
                            
                            <TranslateTransform 
                                X="0" 
                                Y="0"/>
                            
                        </TransformGroup>
                        
                    </Image.RenderTransform>
                    
                </Image>
                
            </Grid>
            
        </Viewbox>
    </Grid>
    
</Window>